/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package MyLib;

import java.net.InetAddress;
import java.util.ArrayList;
import java.util.concurrent.Semaphore;
import javax.swing.JOptionPane;
import org.apache.log4j.Logger;

/**
 *
 * @author QuangHau
 */
public class Comvar {
   public static  ArrayList<ArrayList<InetAddress>> listChunkIP = new ArrayList<ArrayList<InetAddress>>();
   public static Semaphore threadFindChunk = new Semaphore(0);
   public static boolean stopFindChunk = false;
   public static Semaphore threadDownloadFile = new Semaphore(0);
   
   public static void writeLog(int type, String className,  String value){
   
       Logger log = Logger.getLogger(className);
       switch (type)
       {
           case 1:
               log.info(value);
               break;
           case 2:
               log.error(value);
               break;
           case 3:
               log.trace(value);
               break;
       }
       
   }
}
